package cn.dengta.webapp.user.model;

import cn.dengta.common.model.ValueProxy;
import cn.dengta.common.model.ValueProxyImpl;
import lombok.Getter;

@Getter
public enum YearIncomeType implements ValueProxyImpl<YearIncomeType, Integer> {
	LT5W(10,"5万以下"),
	EQ5_TO_10W(20,"5-10万"),
	EQ10_TO_20W(30,"10-20万"),
	EQ20_TO_30W(40,"20-30万"),
	EQ30_TO_50W(50,"30-50万"),
	EQ50_TO_100W(60,"50-100万"),
	GT100W(70,"100万以上"),
	;
	public Integer value;
	public ValueProxy<YearIncomeType, Integer> proxy;

	YearIncomeType(Integer value, String label) {
		this.value = value;
		this.proxy = new ValueProxy<>(this, value, label);
	}

	public static YearIncomeType of(Integer value) {
		return LT5W.getValueOf(value);
	}

	public static String findName(Integer value) {
		return ValueProxyImpl.label(of((value)));
	}
}
